<h2>Reviews for <%= @movie.title %></h2>

<table>
  <tr>
    <th>Score</th>
    <th>User</th>
  </tr>

<% @reviews.each do |review| %>
  <tr>
    <td><%=h review.score %></td>
    <td><%=h review.user.login %></td>
    <td><%= link_to 'Show', movie_review_path(@movie, review) %></td>
    <td><%= link_to 'Edit', edit_movie_review_path(@movie, review) %></td>
    <td><%= link_to 'Destroy', movie_review_path(@movie, review), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<% if logged_in? %>
<ul id="page_nav">
  <li><%= link_to "Add Review", new_movie_review_path(@movie) %></li>
</ul>
<% end %>
